Upgrade @huggingface/transformers to v4.0.0-next.8 for Qwen3.5 support - #59
Conversation
…en3.5 support Fixes two errors when loading onnx-community/Qwen3.5-0.8B-ONNX: - Unknown tokenizer class "TokenizersBackend" (v4 adds @huggingface/tokenizers dep) - Unsupported model type: qwen3_5 (v4 adds qwen3_5 model type support) Updates bun.lock with all new transitive dependencies: - @huggingface/tokenizers@0.1.3 (new) - onnxruntime-web@1.25.0-dev.20260307-d626b568e0 - onnxruntime-node@1.24.3 - onnxruntime-common@1.24.3 - adm-zip@0.5.16 (new dep of onnxruntime-node 1.24.3) All 250 tests pass. TypeScript and ESLint clean. Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Upgrades the app’s @huggingface/transformers dependency to a v4 “next” release to enable loading/running Qwen3.5 ONNX models (the repo’s default model), addressing the current hard failures around the qwen3_5 model type and tokenizer backend support.
Changes:
- Upgrade
@huggingface/transformersfromlatest/v3.x to4.0.0-next.8. - Update
bun.lockto the new dependency graph, including new@huggingface/tokenizersand updatedonnxruntime-*packages.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package.json | Pins the project to a transformers.js v4 prerelease needed for Qwen3.5 support. |
| bun.lock | Locks updated transitive dependencies introduced by the transformers.js v4 upgrade (tokenizers + onnxruntime updates). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| "dependencies": { | ||
| "@huggingface/transformers": "latest" | ||
| "@huggingface/transformers": "^4.0.0-next.8" |
There was a problem hiding this comment.
Using a caret range with a pre-release tag ("^4.0.0-next.8") can unintentionally advance to newer pre-releases or the eventual stable 4.0.0 on the next install/lock refresh, which is a meaningful runtime risk for this app. Consider pinning to the exact version ("4.0.0-next.8") if you want deterministic behavior until you explicitly choose to upgrade again.
| "@huggingface/transformers": "^4.0.0-next.8" | |
| "@huggingface/transformers": "4.0.0-next.8" |
v3.8.1 (
latest) does not support theqwen3_5model type or itsTokenizersBackendtokenizer class, causing hard failures when loadingonnx-community/Qwen3.5-0.8B-ONNX(the default chat and T4 benchmark model).Root cause
Unsupported model type: qwen3_5—AutoModelForCausalLMdid not registerQwen3_5ForConditionalGenerationuntil v4Unknown tokenizer class "TokenizersBackend"— requires the new@huggingface/tokenizerspeer dep introduced in v4Changes
package.json—@huggingface/transformers:latest→4.0.0-next.8bun.lock— updated transitive dependency tree:@huggingface/tokenizers@0.1.3(new in v4)onnxruntime-web:1.22.0-dev→1.25.0-dev.20260307-d626b568e0onnxruntime-node:1.21.0→1.24.3onnxruntime-common:1.21.0→1.24.3adm-zip@0.5.16(new dep ofonnxruntime-node1.24.3, replacestar)No changes to
worker.ts— the v4 public API (pipeline,TextStreamer,InterruptableStoppingCriteria,env,TextGenerationPipeline) is fully backward-compatible with the existing call sites.Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.